import { useBoolean } from './use-boolean'

export const useLoading = (initValue = false) => {
  const { bool: loading, setTrue: startLoading, setFalse: endLoading } = useBoolean(initValue)

  return {
    loading,
    startLoading,
    endLoading
  }
}
